Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transaction history: add input addresses, metadata and slots filter #173

Merged
merged 14 commits into from
Mar 12, 2024

Conversation

ecioppettini
Copy link
Contributor

No description provided.

@ecioppettini ecioppettini self-assigned this Jan 11, 2024
@ecioppettini ecioppettini force-pushed the enzo/transaction-history-transfer-cde branch from 4cac134 to c24477a Compare January 12, 2024 01:18
@ecioppettini ecioppettini marked this pull request as ready for review January 12, 2024 02:38
@@ -87,11 +96,36 @@ export class TransactionHistoryController extends Controller {
});
}

let pageStartWithSlot = pageStart;

if (requestBody.slotLimits) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really should have comments in the code for things like this otherwise it makes it takes a while to understand what is going on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments already, not sure if now it's clear enough.

Comment on lines +111 to +112
address.free();
paymentCred?.free();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi you no longer need to free manually with CML v4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to know, but carp is still on 3.0.1 (

"@dcspark/cardano-multiplatform-lib-nodejs": "3.0.1",
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it will switch with this PR: #159

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's currently only for the indexer though, I don't see a change in the webserver version there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll want to upgrade it (maybe in a separate PR)

webserver/server/.nvmrc Outdated Show resolved Hide resolved
@ecioppettini ecioppettini force-pushed the enzo/transaction-history-transfer-cde branch from 20ea85d to cde3ec4 Compare March 4, 2024 19:41
FROM
"Block"
WHERE
slot <= :low! AND tx_count > 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be slot >= :low!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. This is used later as the :after_tx_id! (when the pagination after parameter is not present). And that parameter is used as "Transaction".id > :after_tx_id!.

Also, the lower bound of the slot range is supposed to be exclusive. Although I've been actually asking myself if this was a good idea or not.

So if you ask for 1 as the lower bound, potentially the first tx needs to be at least in slot 2. If we put >= :low! here and there is no block in slot 1, it would find the last tx in slot 2, and we would end up skipping it because of the other condition.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth adding a comment to explain this

Copy link
Contributor

@SebastienGllmt SebastienGllmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accepting modulo maybe adding a comment as discussed elsewhere on this issue

@SebastienGllmt SebastienGllmt merged commit e5c5ab1 into main Mar 12, 2024
2 checks passed
@SebastienGllmt SebastienGllmt deleted the enzo/transaction-history-transfer-cde branch March 12, 2024 17:28
@SebastienGllmt SebastienGllmt restored the enzo/transaction-history-transfer-cde branch March 16, 2024 23:11
@SebastienGllmt SebastienGllmt deleted the enzo/transaction-history-transfer-cde branch May 9, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants